<?php
// +-------------------------------------------------------------------
// |
// +-------------------------------------------------------------------
// | Copyright (c) 2009-2016 All rights reserved.
// +-------------------------------------------------------------------
namespace Service\Api\V1;

class UserInfo
{
    public $login = true; //是否需要登录才能访问该接口
    public $title = "用户信息ok";
    public $group = '用户';
    public $desc = "";

    public $input = [
    ];

    public $output = [
        'uid' => 'label=uid;',
        'avatar' => 'label=头像地址;',
        'username' => 'label=用户名;',
        'real_name' => 'label=真实姓名;',
        'nickname' => 'label=昵称;',
        'sex' => 'label=性别 0女 1男 2未知;',
        'mobile' => 'label=手机号;',
        'id_card' => 'label=身份证号码;',
        'address' => 'label=联系地址;',

    ];

    public function run($param, $uid, $login_info)
    {
        $result = M('user')->where(['uid' => $uid])->find();
        return $result;
    }
}
